package com.example.demo.repository;

import com.example.demo.domain.SystemConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * 系统常量配置管理Repository
 * @Author zhengmf
 * @Date 2018/12/27  18:26
 */
@Repository
public interface SystemConfigRepository extends JpaRepository<SystemConfig,Long> {

    @Modifying
    @Query("update SystemConfig set status = :status where id = :id")
    void updateStatus(@Param(value = "status") String status, @Param(value = "id") Long id);
}
